commands = {}

function getMOOCommands()
	return commands
end
local function registerCommand_client(data)
	commands[data:ReadString()] = 1
end
usermessage.Hook("moocow_registercommand_client", registerCommand_client)

local function isDirectory(name)
	print("MOOWCOW_LOADED: " .. name)
	if string.find(name, ".", 1, true) == nil then
		return true
	else
		return false
	end
end

function includeAllPlugins(base)
	local list = file.FindInLua(base .. "*")
	for i, thefile in pairs(list) do
		if string.sub(thefile, 1, 1) != "." then
			if not isDirectory(base .. thefile) then
				include(base .. thefile)
				AddCSLuaFile(base .. thefile)
			else
				includeAllPlugins(base .. thefile .. "/")
			end
		end
	end
end

includeAllPlugins("moocow_plugins/")